<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div id="main_list" class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="sectionList" title="工段类别" actionUrl="sectionController.do?datagrid&type=" idField="id" fit="true">
   <t:dgCol title="编号" field="id" hidden="true"></t:dgCol>
   <t:dgCol title="工段类别码" field="code"  width="120"></t:dgCol>
   <t:dgCol title="工段名称" field="name"  width="120"></t:dgCol>
   <t:dgCol title="工段详细描述" field="describe"  width="120"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgFunOpt title="查看该类别列表" funname="querySectionByid(id,code,name)"></t:dgFunOpt>
   <t:dgDelOpt title="删除" url="sectioncateController.do?del&id={id}" />
   <t:dgToolBar title="录入" width="600" height="230" icon="icon-add" url="sectioncateController.do?addorupdate" funname="add"></t:dgToolBar>
   <t:dgToolBar title="编辑" width="600" height="230" icon="icon-edit" url="sectioncateController.do?addorupdate" funname="update"></t:dgToolBar>
   <t:dgToolBar title="查看" width="600" height="230" icon="icon-search" url="sectioncateController.do?addorupdate" funname="detail"></t:dgToolBar>
  </t:datagrid>
  </div>
 </div>
 <div data-options="region:'east',
                    title:'<t:mutiLang langKey="member.list"/>列表',
                    collapsed:true,
                    split:true,
                    border:false,
                    onExpand:function(){ li_east = 1;},
                    onCollapse:function(){li_east = 0;}"
      style="width : 400px; overflow : hidden;"
      id="eastPanel">
      <div class="easyui-panel" style="padding : 0px;border : 0px" fit="true" border="false" id="sectionListpanel"></div>
 </div>
 <script type="text/javascript">
 /* 
  $("#dd").on("click",function(){
	  
  }); */
  $(document).ready(function(){});
  function querySectionByid(id,code,name){
	  var title;
	  if(code=='1'){
		 title= name + "列表";
	  }else if(code=='2'){
		  title= name + "列表";
	  }
	  if(li_east == 0 || $('#main_list').layout('panel','east').panel('options').title != title){
		  $('#main_list').layout('expand','east')
	  }
	  $('#main_list').layout('panel','east').panel('setTitle',title);
	  $('#main_list').layout('panel','east').panel('resize',{width:1000});
	  $('#sectionListpanel').panel("refresh","sectionController.do?sectionlist&type_id="+code);
  }
 </script>